import request from "../utils/axios";
export default {
    // 登陆接口
    getLoginApi: (params?: any) => request({
        url: "/users/login",
        method: "POST",
        data: params,
        mock: true
    }),
    //验证码接口
    getCaptchaApi: (params?: any) => request({
        url: "/users/captcha",
        method: "GET",
        data: params,
        mock: true
    }),



    // echarts图表数据
    getEchartsListApi: (params?: any) => request({
        url: "/echarts/list",
        method: "GET",
        data: params,
        mock: true
    }),



    // 左侧菜单接口
    getMenuListApi: (params?: any) => request({
        url: "/menus/list",
        method: "GET",
        data: params,
        mock: true
    }),
    // 左侧菜单权限
    getPermissionListMenuListApi: (params?: any) => request({
        url: "/users/permissionList",
        method: "POST",
        data: params,
        mock: true
    }),
    // 创建/新增/编辑菜单
    getMenuOperateApi: (params?: any) => request({
        url: "/menus/operate",
        method: "POST",
        data: params,
        mock: true
    }),
    // 删除菜单
    getMenuDeleteApi: (params?: any) => request({
        url: "/menus/delete",
        method: "POST",
        data: params,
        mock: true
    }),



    // 获取用户列表
    getUserListApi: (params?: any) => request({
        url: "/users/list",
        method: "GET",
        data: params,
        mock: true
    }),
    // 新增/编辑用户
    getUserOperateApi: (params?: any) => request({
        url: "/users/operate",
        method: "POST",
        data: params,
        mock: true
    }),
    // 删除/批量删除用户
    getUserDeleteApi: (params?: any) => request({
        url: "/users/delete",
        method: "POST",
        data: params,
        mock: true
    }),



    // 获取角色列表(职位)
    getRoleListApi: (params?: any) => request({
        url: "/roles/list",
        method: "GET",
        data: params,
        mock: true
    }),
    // 新增/编辑角色
    getRoleOperateApi: (params?: any) => request({
        url: "/roles/operate",
        method: "POST",
        data: params,
        mock: true
    }),
    // 设置角色权限
    setRoleAuthApi: (params?: any) => request({
        url: "/roles/setAuth",
        method: "POST",
        data: params,
        mock: true
    }),
    // 删除角色
    getRoleDeleteApi: (params?: any) => request({
        url: "/roles/delete",
        method: "POST",
        data: params,
        mock: true
    }),



    // 部门列表请求渲染
    getDeptListApi: (params?: any) => request({
        url: "/depts/list",
        method: "GET",
        data: params,
        mock: true
    }),
    // 创建/编辑部门
    getDeptOperateApi: (params?: any) => request({
        url: "/depts/operate",
        method: "POST",
        data: params,
        mock: true
    }),
    // 删除部门
    getDeptDeleteApi: (params?: any) => request({
        url: "/depts/delete",
        method: "POST",
        data: params,
        mock: true
    }),


    // 待审批列表渲染 
    getLeaveListApi: (params?: any) => request({
        url: "/leaves/list",
        method: "GET",
        data: params,
        mock: true
    }),
    // 创建审批/作废
    getLeaveOperateApi: (params?: any) => request({
        url: "/leaves/operate",
        method: "POST",
        data: params,
        mock: true
    }),
    // 审批通过/驳回
    getLeaveApproveApi: (params?: any) => request({
        url: "/leaves/approve",
        method: "POST",
        data: params,
        mock: true
    }),



    //上传图片
    upLoadImgApi: (params?: any) => request({
        url: "/uploads/img2",
        method: "GET",
        data: params,
        mock: true
    }),

}